package com.gong.yuanma.spring;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Scope;

/**
 * @author GongChang
 * @version 1.0
 * @date 2021/7/5 0005 22:01
 */
@Configuration
public class Config {

    @Bean(initMethod = "init",destroyMethod = "destory")
    @Lazy
    public Person person(){
        return new Person();
    }

    @Bean
    public MyBeanPostProcessor myBeanPostProcessor(){
        return new MyBeanPostProcessor();
    }

//    @Bean("no2")
//    public PersonFactoryBean personFactoryBean(){
//        return new PersonFactoryBean();
//    }

}
